package com.sense.kukoo.biz_explore.adapter

import com.sense.kukoo.biz_explore.adapter.provider.MusicCollectionItemProvider
import com.sense.kukoo.common.repo.bean.BookBean
import com.sense.kukoo.common.repo.bean.MusicCollectionBean
import com.sense.kukoo.common.wiget.adapter.MultiItemAdapter

class MusicCollectionAdapter(
    listener:MusicCollectionEventListener,
    data: MutableList<MusicCollectionBean>) :
    MultiItemAdapter<MusicCollectionBean>(data) {

    init {
        addItemProvider(MusicCollectionItemProvider(listener))
    }

    override fun getItemType(data: MutableList<MusicCollectionBean>, position: Int): Int {
        return MusicCollectionBean.TYPE_DEF
    }

    interface MusicCollectionEventListener {
        fun onItemClick(book: BookBean, position: Int)
    }
}